<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>cms内容管理系统-新闻</title>
	<meta name="keywords" content="后盾问答"/>
	<meta name="description" content="后盾问答"/>
	<link rel="stylesheet" type="text/css" href="http://localhost/me/11.6/Easycms/Template/default/style/common.css">
	<link rel="stylesheet" type="text/css" href="http://localhost/me/11.6/Easycms/Template/default/style/news.css">
	<script type="text/javascript" src='http://localhost/me/11.6/Easycms/Template/default/js/jquery-1.7.2.min.js'></script>
	<script type="text/javascript" src='http://localhost/me/11.6/Easycms/Template/default/js/index.js'></script>
</head>
<body>
	<!-- 头部 -->
	<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div id="box_top">
		<div class="top">
			<div class="left fl">
				<img src="http://localhost/me/11.6/Easycms/Template/default/images/logo.gif" alt="logo">
			</div>
			<div class="right fr">
				<p>
					<a href="">设为首页</a><span>|</span>
					<a href="">加入收藏</a><span>|</span>
					<a href="">联系我们</a>
				</p>
				<form action="" method="post">
					<input type="text" name="key" class="input_text fl" size="28" placeholder="请输入关键词">
					<input type="submit" class="sub fl" value="搜索">
				</form>
			</div>
		</div>
	</div>

	<!-- 菜单导航 -->

	<div id="menu">
		<ul class="nav">
			<li class="hover"><a href="<?php echo U('Index/Index/index');?>">网站首页</a></li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="<?php echo U('Index/Index/index');?>">关于我们</a>
				<dl style="display: none;">
							<?php
		$cid=1;
		$type=son;
		$db=M('category');
		switch ($type) {
			case 'self':
				$cat=$db->find($cid);
				p($cat);exit;
				$data=$db->where("pid=".$cat['pid'])->all();						
				break;
			
			default:
				$data=$db->where("pid=".$cid)->all();
				break;
		}
		foreach ($data as $field) {
			$field['caturl']=U('Index/Index/category',array('cid'=>$field['cid']));
		?>
		
						<dt>
							<a href="<?php echo $field['caturl'];?>"><?php echo $field['catname'];?></a>
						</dt>
					<?php };?>					
				</dl>
			</li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="http://localhost/me/11.6/Easycms/hd/xinwen/index.html">新闻中心</a>
				<dl style="display: none;">
					<dt>
						<a href="">公司新闻</a>
					</dt>
					<dt>
						<a href="">行内资讯</a>
					</dt>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="<?php echo U('Index/Index/index');?>">产品展示</a>
				<dl style="display: none;">
					<dt>
						<a href="">空气净化器系</a>
					</dt>
					<dt>
						<a href="">空气净化器系</a>
					</dt>
					<dt>
						<a href="">其他系列</a>
					</dt>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li>
				<a href="<?php echo U('Index/Index/index');?>">人才招聘</a>
				<dl style="display: none;">
					<dt>
						<a href="">人才理念</a>
					</dt>
					<dt>
						<a href="">招聘信息</a>
					</dt>
				</dl>
			</li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="news.html">资料下载</a></li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="message.html">在线留言</a></li>
			<li><img src="http://localhost/me/11.6/Easycms/Template/default/images/nav_mid.png"></li>
			<li><a href="contact.html">联系我们</a></li>
		</ul>
	</div>
</body>
</html>
	
	<!-- 空白间隙 -->
	<div id="h10"></div>

	<!-- banner -->

	<div id="banner">
		<ul>
			<li><a href=""><img src="http://localhost/me/11.6/Easycms/Template/default/images/banner1.jpg" alt="banner1"></a></li>
			<li><a href=""><img src="http://localhost/me/11.6/Easycms/Template/default/images/banner2.jpg" alt="banner2"></a></li>
		</ul>
		<p>
			<span class="curs"></span>
			<span></span>
		</p>
		<div class="prev"></div>
    	<div class="next"></div>  
	</div>

	<!-- 空白间隙 -->
	<div id="h10"></div>

	<div id="position">
		<p>您所在的位置：<a href="">首页</a>&gt;<a href="">新闻中心</a></p>
	</div>

	<!-- 主要内容 -->

	<div id="content">
		<div class="contents fl">
			<div class="con_box">
				<div class="con_box_top"><span>新闻中心</span></div>
				<div class="con_box_con">
					<ul>
								<?php
		$cid=$_GET['cid'];
		//获取所有子栏目数据
		$cat=Data::channelList(M('category')->all,$cid);
		//获取所以子栏目的cid
		$cat=array_keys($cat);
		$cat[]=$cid;	
		$db=K('Content');
		$where=$db->where("cc.cid IN(".implode(',',$cat).")");
		$page=new Page($db->where($where)->count(),2);
		$data=$db->where($where)->limit($page->limit())->all();
		foreach ($data as $field) {
			$field['url']=U('Index/Index/content',array('aid'=>$field['aid']));
			$field['title']=mb_substr($field['title'],0,20,'utf-8');

		?>
							<li><a href="<?php echo $field['url'];?>"><?php echo $field['title'];?></a><span><?php echo date('y-m-d',$field['addtime']);?></span></li>
						<?php };?>
					</ul>
					<div class="page">
						<?php echo $page->show() ;?>
					</div>
				</div>
			</div>
		</div>

		<div class="sidebar fr">
			<div class="con_box">
				<div class="con_box_top"><span>新闻中心</span></div>
				<div class="con_box_con">
					<ul>
						<li><span>&gt;&gt;</span><a href="">公司新闻</a></li>
						<li><span>&gt;&gt;</span><a href="">行业资讯</a></li>
					</ul>
				</div>
			</div>

			<!-- 空白间隙 -->
			<div id="h10"></div>

			<div class="con_box">
				<div class="con_box_top"><span>联系我们</span><a href="">更多&gt;&gt;&gt;</a></div>
				<div class="con_box_con">
					<h3>苏州时代网络科技有限公司</h3>
					<p>联系人：陆先生</p>
					<p>电　话：0512-6777××××</p>
					<p>手　机：138××××××××</p>
					<p>邮　箱：sdcms@qq.com</p>
					<p>地　址：苏州市高新区国际科技园</p>
				</div>
			</div>
		</div>
	</div>

	<!-- 空白间隙 -->
	<div id="h10"></div>
	<div id="h10"></div>
	
	<div id="footer">
		<div class="footers">
			<a href="">网站首页</a><span>|</span>
			<a href="">关于我们</a><span>|</span>
			<a href="">人才招聘</a><span>|</span>
			<a href="">联系我们</a><span>|</span>
			<a href="">在线留言</a><span>|</span>
			<a href="">网站地图</a>
		</div>
		<p>版权所有：时代网站信息管理系统企业版<a href="">苏ICP备13000021号</a></p>
		<p>Powered by<a href="">sdcms企业版</a>页面执行时间0.1719秒　查询数据库14次　</p>
	</div>

</body>
</html>